package com.atguigu.lease.common.exception;

import com.atguigu.lease.common.result.ResultCodeEnum;
import lombok.Data;

/*$$$
  @Author:bai
  @CreateTime:2024/11/12 /21:22
  $$$
*/
@Data
public class LeaseException extends RuntimeException{

    private ResultCodeEnum resultCodeEnum;

    public LeaseException(ResultCodeEnum resultCodeEnum) {
        //将错误描述传递给异常的message属性
        super(resultCodeEnum.getMessage());
        this.resultCodeEnum = resultCodeEnum;
    }
}
